<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><title>Modules Overview - Bonfire</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.5 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CSection"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="Modules_Overview"></a>Modules Overview</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#Modules_Overview" >Modules Overview</a></td><td class=SDescription></td></tr><tr class="SGeneric SIndent1 SMarked"><td class=SEntry><a href="#What_Are_Modules" >What Are Modules?</a></td><td class=SDescription>At it&rsquo;s heart, Bonfire is nothing more than a pretty interface that can communicate with modules in a pre-determined way. </td></tr><tr class="SGeneric SIndent1"><td class=SEntry><a href="#Contexts" >Contexts</a></td><td class=SDescription>In Bonfire, there are 6 distinct contexts that help to separate the logic of your modules&rsquo; controllers into tight compartments. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="What_Are_Modules"></a>What Are Modules?</h3><div class=CBody><p>At it&rsquo;s heart, Bonfire is nothing more than a pretty interface that can communicate with modules in a pre-determined way.&nbsp; Almost all of your web application will be creating new modules.</p><p>Modules are groups of code that work together for a common purpose, containing models, views, controllers, libraries, and most any other type of file that CodeIgniter understands.&nbsp; Modules are possible through the use of <a href="http://codeigniter.com/forums/member/45875/" class=LURL target=_top>WireDesignz&rsquo;</a> <a href="https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home" class=LURL target=_top>Modular Extensions HMVC</a>, and support the full HMVC pattern.&nbsp; These files should all focus on a single topic, like an event calendar, pages, a blog system, newsletter, etc.</p></div></div></div>

<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Contexts"></a>Contexts</h3><div class=CBody><p>In Bonfire, there are 6 distinct contexts that help to separate the logic of your modules&rsquo; controllers into tight compartments.&nbsp; The Contexts are...</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Content</td><td class=CDLDescription>Any functions relating to creating or changing something that would be considered &lsquo;site content&rsquo;.&nbsp; This might include pages, snippets of code, events, newsletters, galleries and more.</td></tr><tr><td class=CDLEntry>Statistics</td><td class=CDLDescription>Should provide reporting functions related to your application.</td></tr><tr><td class=CDLEntry>Appearance</td><td class=CDLDescription>Anything to do with how the module appears within the public-facing site.&nbsp; This is usually for customizing the CSS of the module, or similar functions.&nbsp; If all your module needs is a few settings, these should go in...</td></tr><tr><td class=CDLEntry>Settings</td><td class=CDLDescription>Any settings related to your module.&nbsp; These are typically items to are infrequently changed, like the number of events to show on per page, etc.</td></tr><tr><td class=CDLEntry>Developer</td><td class=CDLDescription>This context is meant for tools designed to make the application developer&rsquo;s life easier and may include database tools, code generation, deploy helpers, etc.</td></tr><tr><td class=CDLEntry>Public</td><td class=CDLDescription>This is a general category for any controllers that will directly show information to the public.</td></tr></table><p>With the exception of the Public context, creating a controller for your module for a specific controller is a simple as naming your controller to match the context.&nbsp; A controller for the <u>content</u> context, would be named <b>content.php</b>, while one that shows up in the <u>settings</u> context would be named <b>setting.php</b>.&nbsp; For the public context, the controller should be named the same as the module.&nbsp; For example, a  <u>Pages</u> module would have a public controller called <b>pages.php</b>.</p><p>Each module will automatically show up in the appropriate area of the Admin UI.&nbsp; Again, with the exception of public contexts, which are only available to the public-facing site.</p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MTitle>Bonfire<div class=MSubTitle>Faster CodeIgniter Development</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Guides</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../installing-txt.html">Installing Bonfire</a></div></div><div class=MEntry><div class=MFile id=MSelected>Modules Overview</div></div><div class=MEntry><div class=MFile><a href="../auth_notes-txt.html">Understanding Authentication</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Helpers</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../../files/helpers/address_helper-php.html">Address Helper</a></div></div><div class=MEntry><div class=MFile><a href="../../files/helpers/application_helper-php.html">Application Helper</a></div></div><div class=MEntry><div class=MFile><a href="../../files/helpers/config_file_helper-php.html">Config File Helper</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Libraries</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../../files/libraries/assets-php.html">Assets</a></div></div><div class=MEntry><div class=MFile><a href="../../files/libraries/template-php.html">Template</a></div></div><div class=MEntry><div class=MFile><a href="../../files/core_modules/users/libraries/auth-php.html">Auth</a></div></div><div class=MEntry><div class=MFile><a href="../../files/libraries/Console-php.html">Console</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Core Overrides</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="../../files/core/MY_Controller-php.html">Controllers</a></div></div><div class=MEntry><div class=MFile><a href="../../files/core/MY_Model-php.html">MY_Model</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Core Modules</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MFile><a href="../../files/core_modules/emailer/libraries/emailer-php.html">Emailer</a></div></div><div class=MEntry><div class=MFile><a href="../../files/core_modules/migrations/libraries/Migrations-php.html">Migrations</a></div></div><div class=MEntry><div class=MFile><a href="../../files/core_modules/roles/models/permission_model-php.html">Permission_model</a></div></div><div class=MEntry><div class=MFile><a href="../../files/core_modules/roles/models/role_model-php.html">Role_model</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../../files/controllers/install-php.html">controllers/<wbr>install.php</a></div></div><div class=MEntry><div class=MFile><a href="../../files/core_modules/logs/controllers/developer-php.html">core_modules/.../controllers/<wbr>developer.php</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Index</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Files.html">Files</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([1, 2, 3, 4, 5], 7);// --></script></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>